From 95f6c6643fb4a837a3c36f708d2678aea432dcb0 Mon Sep 17 00:00:00 2001 From: Tom Gilder Date: Wed, 12 Oct 2005 01:13:46 +0000 Subject: [PATCH] Bold tabs and user bar to go with navigation bar --- includes/SkinTemplate.php | 40 +++++++++++++++++++++++++++------------ skins/MonoBook.php | 4 ++-- skins/monobook/main.css | 2 +- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 0902e44b8f..cf8f1b0756 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -430,35 +430,45 @@ class SkinTemplate extends Skin { * @access private */ function buildPersonalUrls() { + global $wgTitle, $wgShowIPinHeader; + $fname = 'SkinTemplate::buildPersonalUrls'; + $pageurl = $wgTitle->getLocalURL(); wfProfileIn( $fname ); /* set up the default links for the personal toolbar */ - global $wgShowIPinHeader; $personal_urls = array(); if ($this->loggedin) { $personal_urls['userpage'] = array( 'text' => $this->username, 'href' => &$this->userpageUrlDetails['href'], - 'class' => $this->userpageUrlDetails['exists']?false:'new' + 'class' => $this->userpageUrlDetails['exists']?false:'new', + 'active' => ( $this->userpageUrlDetails['href'] == $pageurl ) ); $usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage); $personal_urls['mytalk'] = array( 'text' => wfMsg('mytalk'), 'href' => &$usertalkUrlDetails['href'], - 'class' => $usertalkUrlDetails['exists']?false:'new' + 'class' => $usertalkUrlDetails['exists']?false:'new', + 'active' => ( $usertalkUrlDetails['href'] == $pageurl ) ); + $href = $this->makeSpecialUrl('Preferences'); $personal_urls['preferences'] = array( 'text' => wfMsg('preferences'), - 'href' => $this->makeSpecialUrl('Preferences') + 'href' => $this->makeSpecialUrl('Preferences'), + 'active' => ( $href == $pageurl ) ); + $href = $this->makeSpecialUrl('Watchlist'); $personal_urls['watchlist'] = array( 'text' => wfMsg('watchlist'), - 'href' => $this->makeSpecialUrl('Watchlist') + 'href' => $href, + 'active' => ( $href == $pageurl ) ); + $href = $this->makeSpecialUrl("Contributions/$this->username"); $personal_urls['mycontris'] = array( 'text' => wfMsg('mycontris'), - 'href' => $this->makeSpecialUrl("Contributions/$this->username") + 'href' => $href, + 'active' => ( $href == $pageurl . '/' . $this->username ) ); $personal_urls['logout'] = array( 'text' => wfMsg('userlogout'), @@ -466,26 +476,32 @@ class SkinTemplate extends Skin { ); } else { if( $wgShowIPinHeader && isset( $_COOKIE[ini_get("session.name")] ) ) { + $href = &$this->userpageUrlDetails['href']; $personal_urls['anonuserpage'] = array( 'text' => $this->username, - 'href' => &$this->userpageUrlDetails['href'], - 'class' => $this->userpageUrlDetails['exists']?false:'new' + 'href' => $href, + 'class' => $this->userpageUrlDetails['exists']?false:'new', + 'active' => ( $pageurl == $href ) ); $usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage); + $href = &$usertalkUrlDetails['href']; $personal_urls['anontalk'] = array( 'text' => wfMsg('anontalk'), - 'href' => &$usertalkUrlDetails['href'], - 'class' => $usertalkUrlDetails['exists']?false:'new' + 'href' => $href, + 'class' => $usertalkUrlDetails['exists']?false:'new', + 'active' => ( $pageurl == $href ) ); $personal_urls['anonlogin'] = array( 'text' => wfMsg('userlogin'), - 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl ) + 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl ), + 'active' => ( NS_SPECIAL == $wgTitle->getNamespace() && 'Userlogin' == $wgTitle->getDBkey() ) ); } else { $personal_urls['login'] = array( 'text' => wfMsg('userlogin'), - 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl ) + 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl ), + 'active' => ( NS_SPECIAL == $wgTitle->getNamespace() && 'Userlogin' == $wgTitle->getDBkey() ) ); } } diff --git a/skins/MonoBook.php b/skins/MonoBook.php index def7b66c49..d410aa4e2f 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -110,11 +110,11 @@ class MonoBookTemplate extends QuickTemplate {
diff --git a/skins/monobook/main.css b/skins/monobook/main.css index ba76616e9c..149b3e2400 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -691,7 +691,6 @@ special external link styling */ } #p-navigation li.active a, #p-navigation li.active a:hover { - color: #000; text-decoration: none; display: inline; } @@ -837,6 +836,7 @@ li#pt-login { #p-cactions li.selected { border-color: #fabd23; padding: 0 0 .2em 0; + font-weight: bold; } #p-cactions li a { background-color: white; -- 2.20.1